<?php

use Illuminate\Http\Request;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

Route::middleware('auth:api')->get('/user', function (Request $request) {
    return $request->user();
});


//banner图路由
Route::post('/banners', 'HomeController@banner');

//登陆
Route::post('/login', 'LoginController@DoLogin');

//注册
Route::post('/register', 'LoginController@DoRegister');

//报价列表
Route::post('/sheet_list', 'HomeController@SheetList');

//客服电话接口
Route::post('/service', 'HomeController@service');

//添加订单
Route::post('/add_order', 'HomeController@addOrder')->middleware('token');

//收件地址数据
Route::post('/address', 'HomeController@address');

//手机型号数据
Route::post('/phone_models', 'HomeController@PhoneModels');

//免费领膜
Route::post('/get_free_film', 'HomeController@GetFreeFilm')->middleware('token');

//成为合作商
Route::post('/partner', 'HomeController@partner')->middleware('token');

//用户基本信息
Route::post('/user_information', 'UserController@information')->middleware('token');

//修改用户基本信息
Route::post('/update_basic_information', 'UserController@UpdateBasicInformation')->middleware('token');

//修改用户收款信息
Route::post('/update_gathering_information', 'UserController@UpdateGatheringInformation')->middleware('token');

//修改用户收货地址信息
Route::post('/update_shipping_address', 'UserController@UpdateShippingAddress')->middleware('token');

//用户订单列表
Route::post('/order_list', 'OrderController@list')->middleware('token');

//用户订单详情
Route::post('/order_detail', 'OrderController@details')->middleware('token');

//用户确认发货
Route::post('/order_shipments', 'OrderController@shipments')->middleware('token');

//用户确认/取消订单
Route::post('/order_offer', 'OrderController@offer')->middleware('token');

//售后查询
Route::post('/after_query', 'HomeController@AfterQuery');

//快递公司列表
Route::post('/logistics_list', 'HomeController@LogisticsList');

//省市区地址列表
Route::post('/address_list', 'HomeController@addressList');

//发送短信
Route::post('/send_message', 'SmsController@index');

//微信小程序登陆
Route::post('/mini_program', 'LoginController@miniProgram');

//上传图片接口
Route::post('/upload_img', 'HomeController@uploadImg');

//上传多张图片
Route::post('/uploads_img', 'HomeController@uploadsImg');

//判断商家是否存在
Route::post('/merchant_exist', 'HomeController@merchantExist');

//活动图片
Route::post('/activity_show', 'HomeController@activityShow');

//校验用户
Route::post('/check_user_aptitude', 'HomeController@checkUser')->middleware('token');

//校验用户
Route::post('/check_user', 'LoginController@checkUser');